package cn.kevinkun.CompCreator.helpers;

import java.util.HashMap;
import java.util.Map;

import com.google.appinventor.components.common.OptionList;

public enum Property implements OptionList<String> {
	AlignHorizontal("AlignHorizontal"), AlignVertical("AlignVertical"), AlternateText("AlternateText"),
	Animation("Animation"), BackgroundColor("BackgroundColor"), Checked("Checked"), Clickable("Clickable"),
	ColorLeft("ColorLeft"), ColorRight("ColorRight"), CurrentPageTitle("CurrentPageTitle"), CurrentUrl("CurrentUrl"),
	Elements("Elements"), ElementsFromString("ElementsFromString"), Enabled("Enabled"), FollowLinks("FollowLinks"),
	FontBold("FontBold"), FontItalic("FontItalic"), FontSize("FontSize"), HasMargins("HasMargins"), Height("Height"),
	HeightPercent("HeightPercent"), Hint("Hint"), HomeUrl("HomeUrl"), Hour("Hour"), HTMLContent("HTMLContent"),
	HTMLFormat("HTMLFormat"), IgnoreSslErrors("IgnoreSslErrors"), Image("Image"), ImageWidth("ImageWidth"),
	Instant("Instant"), Index("Index"), ItemBackgroundColor("ItemBackgroundColor"), ItemTextColor("ItemTextColor"),
	MaxValue("MaxValue"), Minute("Minute"), MinValue("MinValue"), MultiLine("MultiLine"), NumbersOnly("NumbersOnly"),
	On("On"), Orientation("Orientation"), PasswordVisible("PasswordVisible"), Picture("Picture"), Prompt("Prompt"),
	PromptforPermission("PromptforPermission"), ReadOnly("ReadOnly"), RotationAngle("RotationAngle"),
	ScalePictureToFit("ScalePictureToFit"), Scaling("Scaling"), Selectable("Selectable"), Selection("Selection"),
	SelectionColor("SelectionColor"), SelectionDetailText("SelectionDetailText"), SelectionIndex("SelectionIndex"),
	Show("Show"), ShowFeedback("ShowFeedback"), ShowFilterBar("ShowFilterBar"), Text("Text"),
	TextAlignment("TextAlignment"), TextColor("TextColor"), TextColorDetail("TextColorDetail"),
	ThumbColorActive("ThumbColorActive"), ThumbColorInactive("ThumbColorInactive"), ThumbEnabled("ThumbEnabled"),
	ThumbPosition("ThumbPosition"), Title("Title"), TrackColorActive("TrackColorActive"),
	TrackColorInactive("TrackColorInactive"), Visible("Visible"), WebViewString("WebViewString"), Width("Width"),
	WidthPercent("WidthPercent");

	private String prop;
	private static final Map<String, Property> lookup;

	private Property(String prop) {
		this.prop = prop;
	}

	public String toUnderlyingValue() {
		return this.prop;
	}

	static {
		lookup = new HashMap();
		for (Property prop : values()) {
			lookup.put(prop.toUnderlyingValue(), prop);
		}
	}

	public static Property fromUnderlyingValue(String prop) {
		return (Property) lookup.get(prop);
	}
}
